<template>
    <section>
        <sy-baselist
                editVue="./setting/Dictionary_Edit.vue"
                :fixWhere="'FType='+dicTypeID"
                :filters="filters"
                @beforeAdd="beforeAdd"
                listUrl="server/setting/SetType.ashx?cmd=GetList"
                deleteUrl="server/setting/SetType.ashx?cmd=Delete"
        >
            <el-table-column prop="FName" :label="dicTypeName" width="400" sortable>
            </el-table-column>
            <el-table-column prop="FNote" label="备注" width="200" sortable>
            </el-table-column>
        </sy-baselist>
    </section>
</template>

<script>
    import util from '../../common/util'
    export default {
        data(){
            return {
                dicTypeID:'',
                dicTypeNameGroup:{
                    10:'计量单位',
                    11:'项目类型'},
                dicTypeName:'',
                filters: [{type: "string",name:"FName",text:this.dicTypeName, value: ""}]
            }
        },
        methods:{
            beforeAdd(row){
                row.dicTypeID = this.dicTypeID
            }
        },
        created(){
            this.dicTypeID = this.$router.currentRoute.query.dicTypeID;
            if(this.dicTypeID){
                this.dicTypeName = this.dicTypeNameGroup[this.dicTypeID];
            }
       }
    }
</script>